package cn.iocoder.yudao.module.design.enums.user;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum DesignUserRoleEnum {

    SUPER_ADMIN(1L,"超级管理员"),// 系统角色超级管理员
    DESIGN(114L,"设计师"),// 设计师
    PROJECT_MANAGER(120L,"项目经理"), //项目经理

    OWNER(116L,"业主"),// 业主
    STOREKEEPER(118L,"材料管家"),// 材料管理员
    CUST_SERVICE(119L,"客服"),// 客服
    PRINCIPAL(121L,"供应商负责人"),// 供应商负责人
    /**商务经理*/
    BUSINESS_MANAGER(140L,"商务经理"),

    SUPPLIER(117L,"供应商");  // 供应商
    private Long roleId;

    private String roleName;
    public static String getRoleNameByRoleId(Long roleId) {
        for (DesignUserRoleEnum role : DesignUserRoleEnum.values()) {
            if (role.getRoleId() == roleId) {
                return role.getRoleName();
            }
        }
        return null; // 如果找不到匹配的roleId，则返回null或者抛出异常
    }

}
